package com.sgolub.commanndsonline.domain.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.codehaus.jackson.map.annotate.JsonSerialize;

import com.sgolub.commanndsonline.domain.sec.SecUser;
import com.sgolub.commanndsonline.helpers.CustomDateSerializer;


@Entity
@Table(name = "ENT_USER_BASKET")
public class UserBasket {

    @Id
    @Column(name = "ID")
    @GeneratedValue 
    private Integer id;	
	
    @OneToOne
    @JoinColumn(name = "FK_ADVERTISING_REGISTRY_ID")
    private AdvertisingRegistry advertisingRegistry;
    
    @OneToOne
    @JoinColumn(name = "FK_SEC_USER_ID")
    private SecUser secUser;
    
    @Column(name = "BEGIN_COMMAND_DATE")
    private Date  	beginCommandDate;
    
    @Column(name = "END_COMMAND_DATE")
    private Date  	endCommandDate;
    
    @Column(name = "RESERVATION_TYPE")
    private Integer reservationType;

    
    
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public AdvertisingRegistry getAdvertisingRegistry() {
		return advertisingRegistry;
	}

	public void setAdvertisingRegistry(AdvertisingRegistry advertisingRegistry) {
		this.advertisingRegistry = advertisingRegistry;
	}

	public SecUser getSecUser() {
		return secUser;
	}

	public void setSecUser(SecUser secUser) {
		this.secUser = secUser;
	}

	

//	public SecUser getFkSecUserId() {
//		return fkSecUserId;
//	}
//
//	public void setFkSecUserId(SecUser fkSecUserId) {
//		this.fkSecUserId = fkSecUserId;
//	}

	@JsonSerialize(using = CustomDateSerializer.class)
	public Date getBeginCommandDate() {
		return beginCommandDate;
	}

	public void setBeginCommandDate(Date beginCommandDate) {
		this.beginCommandDate = beginCommandDate;
	}

	@JsonSerialize(using = CustomDateSerializer.class)
	public Date getEndCommandDate() {
		return endCommandDate;
	}

	public void setEndCommandDate(Date endCommandDate) {
		this.endCommandDate = endCommandDate;
	}

	public Integer getReservationType() {
		return reservationType;
	}

	public void setReservationType(Integer reservationType) {
		this.reservationType = reservationType;
	}
    

    
	
}
